class SpiderException(Exception):
    """爬虫基础异常"""
    def __init__(self, message="爬虫运行异常"):
        super().__init__(message)

class CookieUpdateError(SpiderException):
    """Cookie更新异常"""
    def __init__(self, message="Cookie更新失败"):
        super().__init__(message)

class RequestBlockedError(SpiderException):
    """请求被拦截异常"""
    def __init__(self, status_code):
        super().__init__(f"请求被拦截，状态码: {status_code}")

class BrowserInitError(SpiderException):
    """浏览器初始化异常"""
    def __init__(self, message="浏览器初始化失败"):
        super().__init__(message)

class TaskStopException(Exception):
    """任务停止异常"""
    def __init__(self, message="任务停止"):
        super().__init__(message)